#ifndef NETMANAGER_H
#define NETMANAGER_H

#include "baseform.h"

#include <QAbstractSocket>
#include <QLabel>

namespace Ui {
class NetManager;
}

class NetManager : public BaseForm
{
    Q_OBJECT

public:
    explicit NetManager(BaseForm *parent = 0);
    ~NetManager();

protected:
    void initWindow();

private slots:
    void on_btnConnect_clicked();

    void on_btnDisconnect_clicked();

public slots:
    void netStateSlots(int e);
    void netDisconnected();
    void netConnected();

signals:
    void connectToNetSignals(QString address, int port);
    void connectToNet2000Signals(QString address, int port);
    void netDisconnect();
    void net2000Disconnect();

public:
    //显示网络状态。
    void netWorkStats();

private:
    Ui::NetManager *ui;

    QLabel *netStatusLabel;
    QString ip;
    int port;

};

#endif // NETMANAGER_H
